home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 44
/
Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso
/
Aminet
/
comm
/
tcp
/
dhcpd.lha
/
patch-dhcp-2.0
< prev
next >
Wrap
Text File
|
1999-10-10
|
10KB
|
335 lines
diff -C 2 -P -r /ram/dhcp-2.0/Makefile.conf /Data/Src/c/dhcp-2.0/Makefile.conf
*** /ram/dhcp-2.0/Makefile.conf Mon Apr 12 22:35:36 1999
--- /Data/Src/c/dhcp-2.0/Makefile.conf Mon Jun 28 20:26:16 1999
***************
*** 320,321 ****
--- 320,337 ----
#VARDB = /usr/local/etc/dhcp
##--irix--
+
+ ## AmigaOS
+ ##--amigaos--
+ #BINDIR = /bin
+ #INSTALL = /bin/install
+ #MANINSTALL = /bin/install
+ #ADMMANDIR = /man/man8
+ #ADMMANEXT = .8
+ #FFMANDIR = /man/man5
+ #FFMANEXT = .5
+ #VARRUN = /etc
+ #VARDB = /etc
+ #CF = cf/amigaos.h
+ #COPTS = -Wall -Wstrict-prototypes -Wno-unused -Wno-implicit -Wno-comment \
+ # -Wno-uninitialized -Werror -mstackextend
+ ##--amigaos--
diff -C 2 -P -r /ram/dhcp-2.0/Makefile.dist /Data/Src/c/dhcp-2.0/Makefile.dist
*** /ram/dhcp-2.0/Makefile.dist Tue Feb 23 18:08:50 1999
--- /Data/Src/c/dhcp-2.0/Makefile.dist Sun May 16 21:45:36 1999
***************
*** 38,42 ****
(cd $$dir; $(MAKE) all) || exit 1; \
done
! @if [ `uname` = Linux ]; then \
echo; \
echo " !!!! WARNING !!!!"; \
--- 38,43 ----
(cd $$dir; $(MAKE) all) || exit 1; \
done
! @if [ `uname` = Linux ] \
! then \
echo; \
echo " !!!! WARNING !!!!"; \
***************
*** 59,63 ****
(cd $$dir; $(MAKE) install) || exit 1; \
done
! @if [ `uname` = Linux ]; then \
echo; \
echo " !!!! WARNING !!!!"; \
--- 60,65 ----
(cd $$dir; $(MAKE) install) || exit 1; \
done
! @if [ `uname` = Linux ] \
! then \
echo; \
echo " !!!! WARNING !!!!"; \
diff -C 2 -P -r /ram/dhcp-2.0/common/Makefile.dist /Data/Src/c/dhcp-2.0/common/Makefile.dist
*** /ram/dhcp-2.0/common/Makefile.dist Thu May 27 17:44:51 1999
--- /Data/Src/c/dhcp-2.0/common/Makefile.dist Sat Jun 26 21:23:38 1999
***************
*** 59,63 ****
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
foo=$${foo}/$$bar; \
! if [ ! -d $$foo ]; then \
mkdir $$foo; \
chmod 755 $$foo; \
--- 59,64 ----
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
foo=$${foo}/$$bar; \
! if [ ! -d $$foo ] \
! then \
mkdir $$foo; \
chmod 755 $$foo; \
diff -C 2 -P -r /ram/dhcp-2.0/common/raw.c /Data/Src/c/dhcp-2.0/common/raw.c
*** /ram/dhcp-2.0/common/raw.c Tue Apr 6 16:00:24 1999
--- /Data/Src/c/dhcp-2.0/common/raw.c Tue Jun 29 21:29:29 1999
***************
*** 61,65 ****
#if defined (USE_RAW_SEND)
- #include <sys/uio.h>
/* Generic interface registration routine... */
--- 61,64 ----
***************
*** 67,86 ****
struct interface_info *info;
{
- struct sockaddr_in name;
int sock;
- struct socklist *tmp;
int flag;
! /* Set up the address we're going to connect to. */
! name.sin_family = AF_INET;
! name.sin_port = local_port;
! name.sin_addr.s_addr = htonl (INADDR_BROADCAST);
! memset (name.sin_zero, 0, sizeof (name.sin_zero));
!
! /* List addresses on which we're listening. */
! if (!quiet_interface_discovery)
! note ("Sending on %s, port %d",
! piaddr (info -> address), htons (local_port));
!
if ((sock = socket (AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0)
error ("Can't create dhcp socket: %m");
--- 66,73 ----
struct interface_info *info;
{
int sock;
int flag;
! /* Make a socket... */
if ((sock = socket (AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0)
error ("Can't create dhcp socket: %m");
***************
*** 117,121 ****
unsigned char buf [1500];
int bufp = 0;
- struct iovec iov [2];
int result;
--- 104,107 ----
***************
*** 126,130 ****
if (len + bufp > sizeof buf) {
warn ("send_packet: packet too large (%s)", len + bufp);
! return;
}
memcpy (buf + bufp, raw, len);
--- 112,116 ----
if (len + bufp > sizeof buf) {
warn ("send_packet: packet too large (%s)", len + bufp);
! return -1;
}
memcpy (buf + bufp, raw, len);
***************
*** 139,143 ****
--- 125,139 ----
int can_unicast_without_arp ()
{
+ return 0;
+ }
+
+ int can_receive_unicast_unconfigured (ip)
+ struct interface_info *ip;
+ {
+ #if defined (SOCKET_CAN_RECEIVE_UNICAST_UNCONFIGURED)
return 1;
+ #else
+ return 0;
+ #endif
}
diff -C 2 -P -r /ram/dhcp-2.0/common/socket.c /Data/Src/c/dhcp-2.0/common/socket.c
*** /ram/dhcp-2.0/common/socket.c Mon Mar 29 22:07:14 1999
--- /Data/Src/c/dhcp-2.0/common/socket.c Sat Jun 26 21:50:30 1999
***************
*** 245,249 ****
#endif /* USE_SOCKET_RECEIVE */
! #ifdef USE_SOCKET_SEND
/* This just reads in a packet and silently discards it. */
--- 245,249 ----
#endif /* USE_SOCKET_RECEIVE */
! #ifdef USE_SOCKET_FALLBACK
/* This just reads in a packet and silently discards it. */
diff -C 2 -P -r /ram/dhcp-2.0/configure /Data/Src/c/dhcp-2.0/configure
*** /ram/dhcp-2.0/configure Fri Mar 26 16:28:14 1999
--- /Data/Src/c/dhcp-2.0/configure Sat Jun 26 21:13:03 1999
***************
*** 50,53 ****
--- 50,55 ----
NEXTSTEP)
sysname=nextstep;;
+ AmigaOS)
+ sysname=amigaos;;
esac
fi
***************
*** 74,77 ****
--- 76,80 ----
echo " qnx QNX 4.2 or higher"
echo " NEXTSTEP NeXTSTEP"
+ echo " amigaos Amiga 3.x with gcc"
exit 1;
fi
diff -C 2 -P -r /ram/dhcp-2.0/includes/cf/amigaos.h /Data/Src/c/dhcp-2.0/includes/cf/amigaos.h
*** /ram/dhcp-2.0/includes/cf/amigaos.h Thu Jan 1 00:00:00 1970
--- /Data/Src/c/dhcp-2.0/includes/cf/amigaos.h Sun Jun 27 20:27:25 1999
***************
*** 0 ****
--- 1,81 ----
+ /* amigaos.h
+
+ System dependencies for AmigaOS (using GCC)... */
+
+ /*
+ * Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of The Internet Software Consortium nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
+ * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+ * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software was written for the Internet Software Consortium by Ted Lemon
+ * under a contract with Vixie Laboratories.
+ */
+
+ #include <syslog.h>
+ #include <sys/types.h>
+ #include <string.h>
+ #include <paths.h>
+ #include <errno.h>
+ #include <malloc.h>
+ #include <unistd.h>
+ #include <setjmp.h>
+ #include <limits.h>
+
+ #include <sys/wait.h>
+ #include <signal.h>
+
+ extern int h_errno;
+
+ #include <net/if.h>
+ #include <net/if_dl.h>
+
+ /* Varargs stuff... */
+ #include <stdarg.h>
+ #define VA_DOTDOTDOT ...
+ #define va_dcl
+ #define VA_start(list, last) va_start (list, last)
+
+ #ifndef _PATH_DHCPD_PID
+ #define _PATH_DHCPD_PID "/etc/dhcpd.pid"
+ #endif
+ #ifndef _PATH_DHCPD_DB
+ #define _PATH_DHCPD_DB "/etc/dhcpd.leases"
+ #endif
+
+ #define EOL '\n'
+ #define VOIDPTR void *
+
+ /* Time stuff... */
+ #include <sys/time.h>
+ #define TIME time_t
+ #define GET_TIME(x) time ((x))
+
+ #define HAVE_SA_LEN
+
+ #if defined (USE_DEFAULT_NETWORK)
+ # define USE_RAW_SOCKETS
+ #endif
diff -C 2 -P -r /ram/dhcp-2.0/includes/osdep.h /Data/Src/c/dhcp-2.0/includes/osdep.h
*** /ram/dhcp-2.0/includes/osdep.h Sat Apr 24 16:48:54 1999
--- /Data/Src/c/dhcp-2.0/includes/osdep.h Sat Jun 26 21:17:29 1999
***************
*** 132,135 ****
--- 132,139 ----
#endif
+ #if defined(amigaos)
+ # include "cf/amigaos.h"
+ #endif
+
#if !defined (TIME_MAX)
# define TIME_MAX 2147483647
diff -C 2 -P -r /ram/dhcp-2.0/server/Makefile.dist /Data/Src/c/dhcp-2.0/server/Makefile.dist
*** /ram/dhcp-2.0/server/Makefile.dist Sun May 9 16:09:23 1999
--- /Data/Src/c/dhcp-2.0/server/Makefile.dist Mon Jun 28 20:25:33 1999
***************
*** 50,54 ****
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
foo=$${foo}/$$bar; \
! if [ ! -d $$foo ]; then \
mkdir $$foo; \
chmod 755 $$foo; \
--- 50,55 ----
for bar in `echo $(DESTDIR)$${dir} |tr / ' '`; do \
foo=$${foo}/$$bar; \
! if [ ! -d $$foo ] \
! then \
mkdir $$foo; \
chmod 755 $$foo; \
diff -C 2 -P -r /ram/dhcp-2.0/server/confpars.c /Data/Src/c/dhcp-2.0/server/confpars.c
*** /ram/dhcp-2.0/server/confpars.c Thu May 27 17:47:16 1999
--- /Data/Src/c/dhcp-2.0/server/confpars.c Sat Jun 26 21:36:04 1999
***************
*** 140,143 ****
--- 140,144 ----
} while (1);
+ fclose(cfile);
}
diff -C 2 -P -r /ram/dhcp-2.0/server/db.c /Data/Src/c/dhcp-2.0/server/db.c
*** /ram/dhcp-2.0/server/db.c Thu May 6 21:58:46 1999
--- /Data/Src/c/dhcp-2.0/server/db.c Sat Jun 26 21:34:20 1999
***************
*** 255,259 ****
error ("Can't remove old lease database backup %s: %m",
backfname);
! if (link (path_dhcpd_db, backfname) < 0)
error ("Can't backup lease database %s to %s: %m",
path_dhcpd_db, backfname);
--- 255,259 ----
error ("Can't remove old lease database backup %s: %m",
backfname);
! if (rename (path_dhcpd_db, backfname) < 0)
error ("Can't backup lease database %s to %s: %m",
path_dhcpd_db, backfname);